import java.util.*;
import java.io.*;
import java.lang.*;
public class ContainerList
{
  protected String Name;
  protected int LostCount;
  protected boolean Breeched;

  public ContainerList()
  {
    Name = "";
    LostCount = 0;
    Breeched = false;
  }

  public ContainerList(String TokenizedContainerList, String Subdelim)
  {
    StringTokenizer st = new StringTokenizer(TokenizedContainerList,
        Subdelim);
    this.Name      = st.nextToken();
    this.LostCount = Integer.parseInt(st.nextToken());
    this.Breeched  = Boolean.getBoolean(st.nextToken());
  }
  
  public ContainerList(String setName)
  {
    Name      = setName;
    LostCount = 0;
    Breeched  = false;
  }

  public ContainerList(String setName, int setLostCount, boolean isBreeched)
  {
    Name = setName;
    LostCount = setLostCount;
    Breeched = isBreeched;
  }

  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~                             END CONSTRUCTORS                             ~
  ~                            BEGIN ACCESS/MUTATE                           ~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

  public void setName(String newName)
  {
    Name = newName;
  }

  public void setLostCount(int newLostCount)
  {
    LostCount = newLostCount;
  }

  public void setBreeched(boolean isBreeched)
  {
    Breeched = isBreeched;
  }

  public String getName()
  {
    return Name;
  }

  public int getLostCount()
  {
    return LostCount;
  }

  public boolean getBreeched()
  {
    return Breeched;
  }

  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~                            END ACCESS/MUTATE                            ~
   ~                          BEGIN OTHER FUNCTIONS                          ~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  public String toMessage(String delim)
  {
    String message = Name + delim + LostCount + delim + Breeched;
    return message;
  }

  public String toString()
  {
    String str = Name + "\t" + LostCount + "\t" + Breeched + "\n";
    return str;
  }

  public void incrementLostCount()
  {
    LostCount++;
  }

  public void resetLostCount()
  {
    LostCount = 0;
  }

  public boolean isLost()
  {
    return false ? LostCount < 4 : true;
    //return false if LostCount is less than four, else return true
  }

}
